<style lang="scss" scoped="">
  @import '../../styles/variables';


</style>
<template>
  <div class="page-main">
    <el-tabs tab-position="top" tab-click="changePage" :value="currentModule" @tab-click="changePage">
      <el-tab-pane label="服务详情" name="service"></el-tab-pane>
      <el-tab-pane label="连接状态" name="status"></el-tab-pane>
      <el-tab-pane label="服务统计" name="statics"></el-tab-pane>
    </el-tabs>
    <transition name="fade" mode="out-in">
      <router-view></router-view>
    </transition>
  </div>
</template>
<script>
  export default {
    computed: {
      currentModule() {
        return this.$route.meta.mould;
      }
    },
    methods: {
      changePage(tab) {
        this.$router.push({
          path: `/nodes/${this.$route.params.nodeId}/${tab.name}`
        });
      }
    }

  };

</script>
